package com.hk.web.domain.lifeCycle.repository;

import com.hk.commons.enums.UploadFiLeType;
import com.hk.commons.enums.UploadStatus;
import com.hk.web.domain.entity.UploadFile;
import org.springframework.data.jpa.repository.JpaRepository;

/**
 * Created by Antinomy on 16/12/14.
 */
public interface UploadFileRepository extends JpaRepository<UploadFile, Long> {

    UploadFile findFirst1ByMd5AndTypeAndStatus(String hash, UploadFiLeType uploadFiLeType, UploadStatus status);

    UploadFile findFirst1ByNameAndTypeAndStatus(String uploadedFileName, UploadFiLeType uploadFiLeType, UploadStatus status);
}
